package com.xxwy.dependency;

import lombok.Data;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.context.ApplicationContext;

import java.util.Collection;

/**
 * @author wy
 * @date 2020/4/20 11:08
 */
@Data
public class UserRepository {

  //自定义的Bean
  private Collection<User> users;

  //容器依赖（非Bean）依赖注入ok,依赖查找找不到
  private BeanFactory beanFactory;

  //延迟自定义Bean
  private ObjectFactory<User> userObjectFactory;

  //延迟容器Bean
  private ObjectFactory<ApplicationContext> applicationObjectFactory;
}
